
import request from "../util/request";

//添加管理员的请求
export const addAdminRequest = (data) => {
  return request.post("/addAdmin", data)
}

//查询管路员的请求
export const adminListRequest = () => {
  return request.get("/adminList")
}

//删除管路员的请求
export const deleteAdminRequest = (adminName) => {
  return request.delete("/deleteAdmin", {
    params: {
      adminName
    }
  })
}

// 登录请求
export const loginRequest = (data) => {
  // console.log("data",data);
  return request.post("/login",data)
}

//路由切换时,权限校验请求
export const isLoginRequest = ()=>{
  return request.get("/isLogin")
}

//退出登录请求
export const logoutRequest = () => {
  return request.get("/logout")
}